<#assign className = table.className>
<#assign classNameLower = className?uncap_first>
<#assign classNameAllLower = className?lower_case>
package ${basePackage}.${moduleName}.model.request;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
<#list table.columns as column>
    <#if column.sqlName != 'create_time' && column.sqlName != 'update_time' && column.isDateTimeColumn>
import java.time.LocalDateTime;
        <#break>
    </#if>
</#list>
<#list table.columns as column>
    <#if column.isNull?? && !column.isNull>
import javax.validation.constraints.NotNull;
        <#break>
    </#if>
</#list>
<#if table.enumColumns?? && (table.enumColumns?size>0)>
import ${basePackage}.${moduleName}.model.entity.${className};
</#if>
<#list table.columns as column>
    <#if column.isDateTimeColumn>
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
        <#break>
    </#if>
</#list>
<#list table.columns as column>
    <#if column.sqlTypeName == "DECIMAL">
import java.math.BigDecimal;
        <#break>
    </#if>
</#list>

/**
 * ${table.remarks}Form
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class ${className}Form {

    <#list table.columns as column>
        <#if column.sqlName == 'version' || column.sqlName == 'create_time' || column.sqlName == 'update_time' || column.sqlName == 'is_deleted' || column.sqlName == 'remark'>
        <#elseif column.isImage>
    /**
     * ${column.columnAlias?substring(0, column.columnAlias?index_of(":"))}
     */
    <#if column.isNull?? && !column.isNull>
    @NotNull(message = "${column.columnAlias}不能为空", groups = {Add.class})
    </#if>
    private ${column.simpleJavaType} ${column.columnNameLower};

        <#elseif column.isDateTimeColumn>
    /**
    * ${column.columnAlias}
    */
    <#if column.isNull?? && !column.isNull>
    @NotNull(message = "${column.columnAlias}不能为空", groups = {Add.class})
    </#if>
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private ${column.simpleJavaType} ${column.columnNameLower};

        <#elseif column.isEnum>
    /**
     * ${column.columnAlias}
     */
    <#if column.isNull?? && !column.isNull>
    @NotNull(message = "${column.columnAlias}不能为空", groups = {Add.class})
    </#if>
    private ${className}.${column.columnName} ${column.columnNameLower};

        <#else>
    /**
     * ${column.columnAlias}
     */
    <#if column.isNull?? && !column.isNull>
    @NotNull(message = "${column.columnAlias}不能为空", groups = {Add.class})
    </#if>
    private ${column.simpleJavaType} ${column.columnNameLower};

        </#if>
    </#list>

    public interface Add{}

    public interface Update{}
}
